package com.admin.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.admin.bean.SCStudent;

@Mapper
public interface SCStudentMapper {
	@Select("SELECT * FROM sc_student WHERE stu_class = #{stu_class}")
	List<SCStudent> findById(@Param("stu_class") String stu_class);
	
	@Select("SELECT * FROM sc_student")
	List<SCStudent> list();
	
	@Insert("INSERT INTO www_user(id, name, address, phone, email, date) VALUES(#{id},#{name},#{address}, #{phone}, #{email}, #{date})")
	int insert(@Param("id") Long id, 
			@Param("name") String name, 
			@Param("address") String address,
			@Param("phone") String phone,
			@Param("email") String email,
			@Param("date") Date date);
}
